package com.free.mini.core.server.api;

import com.free.mini.core.server.config.CoreServerFeignConfiguration;
import com.free.mini.core.server.vo.req.StudyQuestionUpdateReqVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.free.mini.common.base.ResultData;
import com.free.mini.core.server.vo.req.StudyQuestionCreateReqVO;
import com.free.mini.core.server.vo.req.StudyQuestionListQueryReqVO;
import com.free.mini.core.server.vo.req.StudyQuestionQueryDetailReqVO;
import com.free.mini.core.server.vo.resp.StudyQuestionListQueryRespVO;
import com.free.mini.core.server.vo.resp.StudyQuestionQueryDetailRespVO;

/**
 * @author dongsufeng
 * @version 4.0
 * @date 2023/7/31 11:59
 */
@FeignClient(name = "studyQuestionApi",url = "${feign.core.server.url:http://101.43.170.244:8083}" , configuration = CoreServerFeignConfiguration.class)
public interface StudyQuestionApi {

    /**
     * 查询题目列表
     */
    @PostMapping("study/v1/app/question/list")
    ResultData<Page<StudyQuestionListQueryRespVO>> list(@RequestBody @Validated StudyQuestionListQueryReqVO reqVO);

    @PostMapping("study/v1/app/question/detail")
    ResultData<StudyQuestionQueryDetailRespVO> detail(@RequestBody @Validated StudyQuestionQueryDetailReqVO reqVO);

    /**
     * 录入题目
     * @param reqVO
     * @return
     */
    @PostMapping("study/v1/app/question/create")
    ResultData<Boolean> create(@RequestBody @Validated StudyQuestionCreateReqVO reqVO);

    @PostMapping("study/v1/app/question/update")
    ResultData<Boolean> update(@RequestBody @Validated StudyQuestionUpdateReqVO reqVO);
}
